package com.kuailework.module.${module}.bean;

import javax.persistence.Column;
import javax.persistence.Table;

import com.kuailework.core.base.BaseEntity;

/**
 * 数据库表[${tb.name}]的数据模型
 * ${tb.comment}
 * <#if author??>
 * 
 * @author ${author}
 * </#if>
 */

@Table(name="${tb.name}")
@SuppressWarnings("serial")
public class ${Entity} extends BaseEntity {

    <#list tb.fds as fd>
    // ${fd.comment!fd.name} 
    @Column(name="${fd.name}")
    private ${fd.javaType} ${fd.javaName};
    </#list>
    
    /** 默认构造函数 */
    public ${Entity}() {
    }
    
    /** 全参构造函数 */
    public ${Entity}(<#list tb.fds as fd>${fd.javaType} ${fd.javaName}<#if fd_has_next>, </#if></#list>) {
      <#list tb.fds as fd>
      this.${fd.javaName} = ${fd.javaName};
      </#list>
    }
     
    <#list tb.fds as fd>
    public  ${fd.javaType} get${fd.javaName?cap_first}() {
        return this.${fd.javaName};
    }
    public void set${fd.javaName?cap_first}(${fd.javaType} ${fd.javaName}) {
        this.${fd.javaName} = ${fd.javaName};
    }
    </#list>
}
